<html>
  <head></head>
  <body>
    <link id="firstPrerender" rel=prerender href="/first"/>
    <link id="secondPrerender" rel=prerender href="/second"/>

    <p id="emptyParagraph"></p>

    <script>
      var firstPrerender = document.getElementById('firstPrerender');
      var secondPrerender = document.getElementById('secondPrerender');

      function removeFirstPrerender()
      {
          var link = document.getElementById('firstPrerender');
          link.parentElement.removeChild(link);
      }

      function removeSecondPrerender()
      {
          var link = document.getElementById('firstPrerender');
          link.parentElement.removeChild(link);
      }

      function removeThirdPrerender()
      {
          var link = document.getElementById('thirdPrerender');
          link.parentElement.removeChild(link);
      }

      function addThirdPrerender()
      {
          var emptyParagraph = document.getElementById("emptyParagraph");
          emptyParagraph.innerHTML = '<link id="thirdPrerender" rel=prerender href="/third"/>';
          var thirdPrerender = document.getElementById('thirdPrerender');
      }
    </script>
  </body>
</html>

